3.1.22 \(\int \frac {\cosh ^5(x)}{a+b \cosh ^2(x)} \, dx\) [22]

Optimal. Leaf size=56 \[ \frac {a^2 \text {ArcTan}\left (\frac {\sqrt {b} \sinh (x)}{\sqrt {a+b}}\right )}{b^{5/2} \sqrt {a+b}}-\frac {(a-b) \sinh (x)}{b^2}+\frac {\sinh ^3(x)}{3 b} \]

[Out]

-(a-b)*sinh(x)/b^2+1/3*sinh(x)^3/b+a^2*arctan(sinh(x)*b^(1/2)/(a+b)^(1/2))/b^(5/2)/(a+b)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 56, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3265, 398, 211} \begin {gather*} \frac {a^2 \text {ArcTan}\left (\frac {\sqrt {b} \sinh (x)}{\sqrt {a+b}}\right )}{b^{5/2} \sqrt {a+b}}-\frac {(a-b) \sinh (x)}{b^2}+\frac {\sinh ^3(x)}{3 b} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cosh[x]^5/(a + b*Cosh[x]^2),x]

[Out]

(a^2*ArcTan[(Sqrt[b]*Sinh[x])/Sqrt[a + b]])/(b^(5/2)*Sqrt[a + b]) - ((a - b)*Sinh[x])/b^2 + Sinh[x]^3/(3*b)

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 398

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Int[PolynomialDivide[(a + b*x^n)
^p, (c + d*x^n)^(-q), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && IGtQ[p, 0] && ILt
Q[q, 0] && GeQ[p, -q]

Rule 3265

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = Free
Factors[Cos[e + f*x], x]}, Dist[-ff/f, Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*(a + b - b*ff^2*x^2)^p, x], x, Cos
[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rubi steps

\begin {align*} \int \frac {\cosh ^5(x)}{a+b \cosh ^2(x)} \, dx &=\text {Subst}\left (\int \frac {\left (1+x^2\right )^2}{a+b+b x^2} \, dx,x,\sinh (x)\right )\\ &=\text {Subst}\left (\int \left (-\frac {a-b}{b^2}+\frac {x^2}{b}+\frac {a^2}{b^2 \left (a+b+b x^2\right )}\right ) \, dx,x,\sinh (x)\right )\\ &=-\frac {(a-b) \sinh (x)}{b^2}+\frac {\sinh ^3(x)}{3 b}+\frac {a^2 \text {Subst}\left (\int \frac {1}{a+b+b x^2} \, dx,x,\sinh (x)\right )}{b^2}\\ &=\frac {a^2 \tan ^{-1}\left (\frac {\sqrt {b} \sinh (x)}{\sqrt {a+b}}\right )}{b^{5/2} \sqrt {a+b}}-\frac {(a-b) \sinh (x)}{b^2}+\frac {\sinh ^3(x)}{3 b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.12, size = 61, normalized size = 1.09 \begin {gather*} -\frac {a^2 \text {ArcTan}\left (\frac {\sqrt {a+b} \text {csch}(x)}{\sqrt {b}}\right )}{b^{5/2} \sqrt {a+b}}-\frac {(4 a-3 b) \sinh (x)}{4 b^2}+\frac {\sinh (3 x)}{12 b} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cosh[x]^5/(a + b*Cosh[x]^2),x]

[Out]

-((a^2*ArcTan[(Sqrt[a + b]*Csch[x])/Sqrt[b]])/(b^(5/2)*Sqrt[a + b])) - ((4*a - 3*b)*Sinh[x])/(4*b^2) + Sinh[3*
x]/(12*b)

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(164\) vs. \(2(46)=92\).
time = 0.52, size = 165, normalized size = 2.95

method result size
risch \(\frac {{\mathrm e}^{3 x}}{24 b}-\frac {a \,{\mathrm e}^{x}}{2 b^{2}}+\frac {3 \,{\mathrm e}^{x}}{8 b}+\frac {{\mathrm e}^{-x} a}{2 b^{2}}-\frac {3 \,{\mathrm e}^{-x}}{8 b}-\frac {{\mathrm e}^{-3 x}}{24 b}-\frac {a^{2} \ln \left ({\mathrm e}^{2 x}-\frac {2 \left (a +b \right ) {\mathrm e}^{x}}{\sqrt {-a b -b^{2}}}-1\right )}{2 \sqrt {-a b -b^{2}}\, b^{2}}+\frac {a^{2} \ln \left ({\mathrm e}^{2 x}+\frac {2 \left (a +b \right ) {\mathrm e}^{x}}{\sqrt {-a b -b^{2}}}-1\right )}{2 \sqrt {-a b -b^{2}}\, b^{2}}\) \(146\)
default \(-\frac {1}{3 b \left (\tanh \left (\frac {x}{2}\right )-1\right )^{3}}-\frac {1}{2 b \left (\tanh \left (\frac {x}{2}\right )-1\right )^{2}}-\frac {-a +b}{b^{2} \left (\tanh \left (\frac {x}{2}\right )-1\right )}+\frac {2 a^{2} \left (\frac {\arctan \left (\frac {2 \sqrt {a +b}\, \tanh \left (\frac {x}{2}\right )+2 \sqrt {a}}{2 \sqrt {b}}\right )}{2 \sqrt {a +b}\, \sqrt {b}}+\frac {\arctan \left (\frac {2 \sqrt {a +b}\, \tanh \left (\frac {x}{2}\right )-2 \sqrt {a}}{2 \sqrt {b}}\right )}{2 \sqrt {a +b}\, \sqrt {b}}\right )}{b^{2}}-\frac {1}{3 b \left (\tanh \left (\frac {x}{2}\right )+1\right )^{3}}+\frac {1}{2 b \left (\tanh \left (\frac {x}{2}\right )+1\right )^{2}}-\frac {-a +b}{b^{2} \left (\tanh \left (\frac {x}{2}\right )+1\right )}\) \(165\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cosh(x)^5/(a+b*cosh(x)^2),x,method=_RETURNVERBOSE)

[Out]

-1/3/b/(tanh(1/2*x)-1)^3-1/2/b/(tanh(1/2*x)-1)^2-1/b^2*(-a+b)/(tanh(1/2*x)-1)+2*a^2/b^2*(1/2/(a+b)^(1/2)/b^(1/
2)*arctan(1/2*(2*(a+b)^(1/2)*tanh(1/2*x)+2*a^(1/2))/b^(1/2))+1/2/(a+b)^(1/2)/b^(1/2)*arctan(1/2*(2*(a+b)^(1/2)
*tanh(1/2*x)-2*a^(1/2))/b^(1/2)))-1/3/b/(tanh(1/2*x)+1)^3+1/2/b/(tanh(1/2*x)+1)^2-1/b^2*(-a+b)/(tanh(1/2*x)+1)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(x)^5/(a+b*cosh(x)^2),x, algorithm="maxima")

[Out]

1/24*(b*e^(6*x) - 3*(4*a - 3*b)*e^(4*x) + 3*(4*a - 3*b)*e^(2*x) - b)*e^(-3*x)/b^2 + 1/32*integrate(64*(a^2*e^(
3*x) + a^2*e^x)/(b^3*e^(4*x) + b^3 + 2*(2*a*b^2 + b^3)*e^(2*x)), x)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 557 vs. \(2 (46) = 92\).
time = 0.39, size = 1184, normalized size = 21.14 \begin {gather*} \text {Too large to display} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(x)^5/(a+b*cosh(x)^2),x, algorithm="fricas")

[Out]

[1/24*((a*b^2 + b^3)*cosh(x)^6 + 6*(a*b^2 + b^3)*cosh(x)*sinh(x)^5 + (a*b^2 + b^3)*sinh(x)^6 - 3*(4*a^2*b + a*
b^2 - 3*b^3)*cosh(x)^4 - 3*(4*a^2*b + a*b^2 - 3*b^3 - 5*(a*b^2 + b^3)*cosh(x)^2)*sinh(x)^4 + 4*(5*(a*b^2 + b^3
)*cosh(x)^3 - 3*(4*a^2*b + a*b^2 - 3*b^3)*cosh(x))*sinh(x)^3 - a*b^2 - b^3 + 3*(4*a^2*b + a*b^2 - 3*b^3)*cosh(
x)^2 + 3*(5*(a*b^2 + b^3)*cosh(x)^4 + 4*a^2*b + a*b^2 - 3*b^3 - 6*(4*a^2*b + a*b^2 - 3*b^3)*cosh(x)^2)*sinh(x)
^2 - 12*(a^2*cosh(x)^3 + 3*a^2*cosh(x)^2*sinh(x) + 3*a^2*cosh(x)*sinh(x)^2 + a^2*sinh(x)^3)*sqrt(-a*b - b^2)*l
og((b*cosh(x)^4 + 4*b*cosh(x)*sinh(x)^3 + b*sinh(x)^4 - 2*(2*a + 3*b)*cosh(x)^2 + 2*(3*b*cosh(x)^2 - 2*a - 3*b
)*sinh(x)^2 + 4*(b*cosh(x)^3 - (2*a + 3*b)*cosh(x))*sinh(x) - 4*(cosh(x)^3 + 3*cosh(x)*sinh(x)^2 + sinh(x)^3 +
 (3*cosh(x)^2 - 1)*sinh(x) - cosh(x))*sqrt(-a*b - b^2) + b)/(b*cosh(x)^4 + 4*b*cosh(x)*sinh(x)^3 + b*sinh(x)^4
 + 2*(2*a + b)*cosh(x)^2 + 2*(3*b*cosh(x)^2 + 2*a + b)*sinh(x)^2 + 4*(b*cosh(x)^3 + (2*a + b)*cosh(x))*sinh(x)
 + b)) + 6*((a*b^2 + b^3)*cosh(x)^5 - 2*(4*a^2*b + a*b^2 - 3*b^3)*cosh(x)^3 + (4*a^2*b + a*b^2 - 3*b^3)*cosh(x
))*sinh(x))/((a*b^3 + b^4)*cosh(x)^3 + 3*(a*b^3 + b^4)*cosh(x)^2*sinh(x) + 3*(a*b^3 + b^4)*cosh(x)*sinh(x)^2 +
 (a*b^3 + b^4)*sinh(x)^3), 1/24*((a*b^2 + b^3)*cosh(x)^6 + 6*(a*b^2 + b^3)*cosh(x)*sinh(x)^5 + (a*b^2 + b^3)*s
inh(x)^6 - 3*(4*a^2*b + a*b^2 - 3*b^3)*cosh(x)^4 - 3*(4*a^2*b + a*b^2 - 3*b^3 - 5*(a*b^2 + b^3)*cosh(x)^2)*sin
h(x)^4 + 4*(5*(a*b^2 + b^3)*cosh(x)^3 - 3*(4*a^2*b + a*b^2 - 3*b^3)*cosh(x))*sinh(x)^3 - a*b^2 - b^3 + 3*(4*a^
2*b + a*b^2 - 3*b^3)*cosh(x)^2 + 3*(5*(a*b^2 + b^3)*cosh(x)^4 + 4*a^2*b + a*b^2 - 3*b^3 - 6*(4*a^2*b + a*b^2 -
 3*b^3)*cosh(x)^2)*sinh(x)^2 + 24*(a^2*cosh(x)^3 + 3*a^2*cosh(x)^2*sinh(x) + 3*a^2*cosh(x)*sinh(x)^2 + a^2*sin
h(x)^3)*sqrt(a*b + b^2)*arctan(1/2*(b*cosh(x)^3 + 3*b*cosh(x)*sinh(x)^2 + b*sinh(x)^3 + (4*a + 3*b)*cosh(x) +
(3*b*cosh(x)^2 + 4*a + 3*b)*sinh(x))/sqrt(a*b + b^2)) + 24*(a^2*cosh(x)^3 + 3*a^2*cosh(x)^2*sinh(x) + 3*a^2*co
sh(x)*sinh(x)^2 + a^2*sinh(x)^3)*sqrt(a*b + b^2)*arctan(1/2*sqrt(a*b + b^2)*(cosh(x) + sinh(x))/(a + b)) + 6*(
(a*b^2 + b^3)*cosh(x)^5 - 2*(4*a^2*b + a*b^2 - 3*b^3)*cosh(x)^3 + (4*a^2*b + a*b^2 - 3*b^3)*cosh(x))*sinh(x))/
((a*b^3 + b^4)*cosh(x)^3 + 3*(a*b^3 + b^4)*cosh(x)^2*sinh(x) + 3*(a*b^3 + b^4)*cosh(x)*sinh(x)^2 + (a*b^3 + b^
4)*sinh(x)^3)]

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(x)**5/(a+b*cosh(x)**2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(x)^5/(a+b*cosh(x)^2),x, algorithm="giac")

[Out]

Exception raised: TypeError >> An error occurred running a Giac command:INPUT:sage2:=int(sage0,sageVARx):;OUTP
UT:Warning, need to choose a branch for the root of a polynomial with parameters. This might be wrong.The choi
ce was done

________________________________________________________________________________________

Mupad [B]
time = 1.25, size = 243, normalized size = 4.34 \begin {gather*} \frac {{\mathrm {e}}^{3\,x}}{24\,b}-\frac {{\mathrm {e}}^{-3\,x}}{24\,b}+\frac {{\mathrm {e}}^{-x}\,\left (4\,a-3\,b\right )}{8\,b^2}+\frac {\sqrt {a^4}\,\left (2\,\mathrm {atan}\left (\frac {a^2\,{\mathrm {e}}^x\,\sqrt {b^5\,\left (a+b\right )}}{2\,b^2\,\left (a+b\right )\,\sqrt {a^4}}\right )-2\,\mathrm {atan}\left (\left (\frac {b^7\,\sqrt {b^6+a\,b^5}}{4}+\frac {a\,b^6\,\sqrt {b^6+a\,b^5}}{4}\right )\,\left ({\mathrm {e}}^x\,\left (\frac {2\,a^2}{b^8\,{\left (a+b\right )}^2\,\sqrt {a^4}}-\frac {4\,\left (2\,a^3\,b^3\,\sqrt {a^4}+2\,a^4\,b^2\,\sqrt {a^4}\right )}{a^5\,b^6\,\left (a+b\right )\,\sqrt {b^5\,\left (a+b\right )}\,\sqrt {b^6+a\,b^5}}\right )-\frac {2\,a^2\,{\mathrm {e}}^{3\,x}}{b^8\,{\left (a+b\right )}^2\,\sqrt {a^4}}\right )\right )\right )}{2\,\sqrt {b^6+a\,b^5}}-\frac {{\mathrm {e}}^x\,\left (4\,a-3\,b\right )}{8\,b^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cosh(x)^5/(a + b*cosh(x)^2),x)

[Out]

exp(3*x)/(24*b) - exp(-3*x)/(24*b) + (exp(-x)*(4*a - 3*b))/(8*b^2) + ((a^4)^(1/2)*(2*atan((a^2*exp(x)*(b^5*(a
+ b))^(1/2))/(2*b^2*(a + b)*(a^4)^(1/2))) - 2*atan(((b^7*(a*b^5 + b^6)^(1/2))/4 + (a*b^6*(a*b^5 + b^6)^(1/2))/
4)*(exp(x)*((2*a^2)/(b^8*(a + b)^2*(a^4)^(1/2)) - (4*(2*a^3*b^3*(a^4)^(1/2) + 2*a^4*b^2*(a^4)^(1/2)))/(a^5*b^6
*(a + b)*(b^5*(a + b))^(1/2)*(a*b^5 + b^6)^(1/2))) - (2*a^2*exp(3*x))/(b^8*(a + b)^2*(a^4)^(1/2))))))/(2*(a*b^
5 + b^6)^(1/2)) - (exp(x)*(4*a - 3*b))/(8*b^2)

________________________________________________________________________________________